import request from '@/utils/request'

export function getroles() {
  return request({
    url: '/api/roles',
    method: 'get'
  })
}

export function postroles(data) {
  return request({
    url: '/api/roles',
    method: 'post',
    data
  })
}

export function putroles(id, data) {
  return request({
    url: '/api/roles/' + id,
    method: 'put',
    id,
    data
  })
}

export function deleteroles(id) {
  return request({
    url: '/api/roles/' + id,
    method: 'delete',
    id
  })
}

export function saveRolepermission(data) {
  return request({
    url: '/api/roles/saveRolepermission',
    method: 'post',
    data
  })
}

// export function deletePermission(id) {
//   return request({
//     url: '/api/roles/deletePermission/' + id,
//     method: 'delete',
//     id
//   })
// }
